﻿using System;
using System.Diagnostics;
using Reflector.CodeModel;

namespace CallGraphExtractor.CecilAdapter
{
    [DebuggerDisplay("Name")]
    class EventDeclaration : MemberDeclaration, IEventDeclaration
    {
        #region Lifecycle

        public EventDeclaration(Mono.Cecil.EventDefinition eventDefinition)
            : base(eventDefinition) { }

        #endregion Lifecycle

        #region Properties

        private Mono.Cecil.EventDefinition pEventDefinition;
        private Mono.Cecil.EventDefinition EventDefinition
        {
            get
            {
                if (pEventDefinition == null)
                    pEventDefinition = this.Adaptee as Mono.Cecil.EventDefinition;
                return pEventDefinition;
            }
        }

        #endregion Properties

        #region IEventDeclaration Members

        public IMethodReference AddMethod
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public IMethodReference InvokeMethod
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public IMethodReference RemoveMethod
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public bool RuntimeSpecialName
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public bool SpecialName
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        #region IMemberReference Members

        public IType DeclaringType
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string Name
        {
            get { return this.EventDefinition.Name; }
            set { throw new NotSupportedException(); }
        }

        #endregion

        #region IComparable Members

        public int CompareTo(object obj)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region ICustomAttributeProvider Members

        public ICustomAttributeCollection Attributes
        {
            get { throw new NotImplementedException(); }
        }

        #endregion

        #region IDocumentationProvider Members

        public string Documentation
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        #region IEventReference Members

        public ITypeReference EventType
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public IEventReference GenericEvent
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public IEventDeclaration Resolve()
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
